<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../static/js/jquery.min.js"></script>
</head>
<body>
    <h1>疫情防控</h1>
    <h3>感染人数</h3>
    <button>点我！</button>
    <script>
        $("button").click(function () {
            $.ajax({
                url:"/ajax",
                type:"post",
                data:{"name":"mzh","age":23},
                success:function(d) {
                    $("h3").html("感染人数" + d.split(',')[1])
                }, error:function() {
                    alert("发送ajax请求失败")
                }
            })
        })
    </script>
</body>
</html>